-
Notifications
You must be signed in to change notification settings - Fork 339
Fix unknown type cast crash #994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix unknown type cast crash #994
Conversation
4038311
to
4b3d055
Compare
Hi @vedantk, could you take a look at this, if/when you have the time? Related to this post you helped me with |
Hey @augusto2112, thanks for doing this, this seems like the right approach. I noticed that there are quite a few formatting diffs in the file unrelated to your change: perhaps these got pulled in by clang-format? Please update the diff to remove those unrelated changes if possible. It should be good to land afterwards. |
Hi @vedantk, I was thinking in doing a small change: expose a public What do you think?
Yeah, I think it was because of clang-format. I'll update that. |
It may be convenient in the future to have AddErrorStatusAsGenericDiagnostic as part of SwiftASTContext's public interface. I think it'd be fine to add the helper, though. |
4b3d055
to
2b2672b
Compare
2b2672b
to
0718eea
Compare
@vedantk OK, I pushed the changes. |
@swift-ci test |
@augusto2112 could you open a PR submitting this change to apple:swift/master-next as well? Otherwise, the change will disappear after the next rebase (we do not auto merge lldb changes from swift/master to swift/master-next). If you don't have the bandwidth for that, just lmk, and I'll handle it. Thanks. |
(Incidentally if you've done other lldb work on swift/master, this will need to be cherry-picked to swift/master-next as well.) |
@vedantk Ok, will do!
I've done a couple, I usually wait to see if the tests pass before cherry-picking so I don't have to re-do the master-next in case I have to change something. |
This PR fixes the crash reported here. In addition, it improves the error message when type reconstruction fails in the
SwiftASTContext
class.